<!DOCTYPE html>
<html
	class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport"
	content="target-densitydpi=device-dpi, width=device-width, initial-scale=1.0, user-scalable=no" />
<link rel="stylesheet" type="text/css" href="css/index.css">
<link rel="stylesheet" href="css/ui-base.css">
<link rel="stylesheet" href="css/ui-box.css">
<link rel="stylesheet" href="css/ui-color.css">
<link rel="stylesheet" href="css/ui-res.css">
<link rel="stylesheet" href="css/ui-btn.css">
<link rel="stylesheet" href="css/index.css">
<script src="js/zy_control.js">
	
</script>
<script src="js/zy_click.js">
	
</script>
<script type="text/javascript">
	var uploadHttp = "http://up.qiniu.com/";
	function explorerSuccess(data) {
		document.getElementById('dirPath').value = obj.fileExplorerPath;
	}
	function upload() {
		uexUploader.onStatus = function(opCode, fileSize, percent, serverPath,
				status) {
			switch (status) {
			case 0:
				document.getElementById('percentage').innerHTML = "文件大小："
						+ fileSize + "字节<br>上传进度：" + percent + "%";
				break;
			case 1:
				uexUploader.closeUploader(1);
				break;
			case 2:
				alert("上传失败");
				uexUploader.closeUploader(1);
				break;

			}
		}
		alert("11");
		uexUploader.cbCreateUploader = function(opId,dataType,data){
			if(dataType == 2 && data==0){
				alert("23");
				var postval = '[{"name":"key","val":"abcd.png"},{"name":"token","val":"Zg1kM4Pq9WJZCGyJ8ka51FLXhiXdCdg1kCU_Ftux:jFOFs5ZgKEXgyzn5sOr7SBSGgG0=:eyJzY29wZSI6ImZ3dHN0byIsImRlYWRsaW5lIjoxNDI3MzU1NTIxfQ=="}]';
				uexUploader.uploadFile(1, document.getElementById('dirPath').value,
						"file", postval, document.getElementById('ys').value, 100);
			}
		}
		alert("22");
		uexUploader.createUploader(1, uploadHttp);
	}

	window.uexOnload = function() {
		uexWidgetOne.cbError = function(opCode, errorCode, errorInfo) {
			alert(errorInfo);
		}
		
	}
</script>
</head>
<body class="um-vp " ontouchstart>
	<div class="conbor">
		<div class="consj">
			<span>1.文件上传</span> <span>文件路径：</span> <input class="btn"
				type="button" value="启动文件浏览器" onclick="uexFileMgr.explorer('');">

			<input class="textbox" id="dirPath" type="text"
				value="res://20150325092801.jpg"> <span>是否压缩</span> <input
				class="textbox" id="ys" name="是否压缩" type="text" value="1"> <input
				class="btn" type="button" value="上传文件" onclick="upload();">

			<span>文件上传状态</span>
			<div class="tcxx" id="percentage"></div>
			<!-- 
			<span>2.数据上传</span>
			<input class="textbox" id="data" type="text" value="上传的数据" >
			<input  class="btn" type="button" value="上传数据" onclick="upload1();">
			-->
			<br>
		</div>
	</div>
</body>
<script>
	
</script>
</html>
